#include <cstdio>

#define MAX_NR 101
#define MAX_N MAX_NR
#define MAX_R MAX_NR

#define INPUT_FORMAT "%ld %ld"
#define OUTPUT_FORMAT "%ld things taken %ld at a time is %lu exactly.\n"

typedef long int lint;
typedef unsigned long int uint;


uint comb[MAX_N][MAX_R] = {0};


uint combination (lint n, lint r)
{
	#ifdef DEBUG
		fprintf(stderr, "c(%2ld,%2ld) = ", n, r);
		#define ret(x) {fprintf(stderr, "%lu\n", n, r, x); return x;}
	#else
		#define ret(x) return x;
	#endif

	if (r < 0 || r > n)
		ret (0);

	uint &c = comb[n][r];
	if (c)
		ret (c);

	--n;
	c = combination(n,r-1) + combination(n,r);
	ret (c);
}


int main ()
{
	lint m, n;

	comb[0][0] = 1;

	while (scanf(INPUT_FORMAT, &n, &m), (m || n))
	{
		printf(OUTPUT_FORMAT, n, m, combination(n,m));
	}

	return 0;
}